﻿
using ERP.Workflow.Designer.Domain;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.MultiTenancy;

namespace ERP.Workflow.Designer.EntityFrameworkCore;


[ConnectionStringName(WorkflowDesignerDbProperties.ConnectionStringName)]
public class WorkflowDesignerDbContext : AbpDbContext<WorkflowDesignerDbContext>, IWorkflowDesignerDbContext
{ 

    public WorkflowDesignerDbContext(DbContextOptions<WorkflowDesignerDbContext> options)
        : base(options)
    {

    }
    public DbSet<Definition>? Definition { get; set; }
    public DbSet<Node>? Nodes { get; set; }
    public DbSet<Port>? Ports { get; set; }
    public DbSet<Link>? Links { get; set; }
    public DbSet<LinkLabel>? LinkLabels { get; set; }
    public DbSet<LinkVertex>? LinkVertexs { get; set; }
   
    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);
        builder.ConfigureWorkflowDesigner();
    }
}


